
  #define TRUE 0
 
  struct SIM_DATA {
	
	// Miscelleanous parameters
	// -----------------------------------------------------------------
	int id; //Simulation ID
	long N; //Total number of bodies
	long N_active; //Total number of non-ghost bodies
	long N_ghosts; //Total number of ghost bodies
	int  container; //Container of the simulation
	double container_params[9]; //Parameters of the container
	int allow_outlayers; //Whether or not to let particles move out of the simulation box  
	// -----------------------------------------------------------------
	
	// Timestep scheme parameters
	double dtnext, tcrit, tmin, Time, nsteps;
	double eta, eps2;
	
	// Data
	double* X;      // pointer to the position array. Mass is in the fourth index (3)
	double* X_p;    // pointer to the position array (predictor)
	
	double* XDOT;   // pointer to the velocity array 
	double* XDOT_p; // pointer to the velocity array (predictor) 
	
	double* F; // pointer to the force array
	double* FDOT; //pointer to the jerk (force derivate) array
	double *D2,*D3,*T0,*STEP; // pointer to timesteping related arrays
	
	int* NEXT; // pointer to the block-step array.
  
	//Paths where the initial conditions and parameter files are saved
    char in_config_path[256];
    char in_coords_path[256];
  
  }; 

  typedef struct SIM_DATA SIM_DATA;

  int allocate_arrays( SIM_DATA* s );
  
  int check_simulation_params( SIM_DATA* s );

  int dump_phasecoordinates( FILE* stream, SIM_DATA* s );
